<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="index.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="favicon.ico">
<link rel="Shortcut Icon" href="favicon.ico" />

<title>主页</title>
<meta name="keywords" content="耶回收">
<meta name="description" content="耶回收">
<link href="<%=basePath%>static/kindeditor/themes/default/default.css" >
<link rel="stylesheet" href="<%=basePath%>static/kindeditor/plugins/code/prettify.css" />
<script type="text/javascript" src="<%=basePath%>static/kindeditor/kindeditor-all-min.js"></script>
<script type="text/javascript" src="<%=basePath%>static/kindeditor/lang/zh-CN.js"></script>
<script charset="utf-8" src="<%=basePath%>static/kindeditor/plugins/code/prettify.js"></script>
	
</head>
<body>
	<!--_表格--开始-->
	<section class="Hui-article-box" style="overflow: auto"> <nav
		class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
	新闻管理 <span class="c-gray en">&gt;</span> 说明管理 <span class="c-gray en">&gt;</span>
	说明修改 </nav>

	<div class="page-container">
		<form action="descupdate" method="post" class="form form-horizontal"
			id="form-back-add">
			<div class="row cl" style="margin-top: 50px">
				<input style="visibility: hidden;" name="id" value="${dt.id }">
				<label class="form-label col-xs-4 col-sm-3">说明主题：</label>
				<div class="formControls col-xs-8 col-sm-6">
					<input type="text" class="input-text"
						data-msg-required="说明主题不能为空" data-rule-required="true" value="${dt.title }"  name="title">
				</div>
			</div>

			<div class="row cl" style="margin-top: 50px">
				<label class="form-label col-xs-4 col-sm-3">说明类容：</label>
				<div class="formControls col-xs-8 col-sm-6">
					
					<textarea style="width: 800px;height: 300px;visibility:hidden;display: block;"
						 id="editor_id"  name="desc">${dt.desc}</textarea>
				</div>
			</div>

			<div class="row cl" style="margin-top: 50px">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<button class="btn btn-primary radius" type="submit">
						<i class="Hui-iconfont">&#xe632;</i>修改说明
					</button>
				</div>
			</div>

		</form>
	</div>

	</section>

</body>
<script type="text/javascript"
	src="lib/webuploader/0.1.5/webuploader.min.js"></script>
<script src="<%=basePath%>lib/jquery.validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">

//简单模式初始化
var editor;

KindEditor.ready(function(K) {
    editor = K.create('textarea[name="desc"]', {
        resizeType : 1,
        allowPreviewEmoticons : false,
        allowImageUpload : false,
        items : ['source', '|', 'fullscreen', 'undo', 'redo','cut', 'copy', 'paste',
        	'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        	'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        	'superscript', '|', 'selectall', '-',
        	'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
        	'italic', 'underline', 'strikethrough', 'removeformat', '|',
 			'advtable', 'hr', 'emoticons', 'link', 'unlink', '|', 'about']
    });
});

var ss = $("#editor_id").val();
editor.html(ss);

	//表单验证
	$(function(){
		 
		 $("#form-back-add").validate( {
			 submitHandler: function(form){
					
				 return  desctest();
			     //发出ajax请求 根据回调函数的返回值 来判断checkBackitemExsit()的返回值；
			    
			    }
		 }); 
	 });

	function desctest(){
		editor.sync('editor_id');
		var aaa = $("#editor_id").val();
		if(aaa!=null && aaa!=""){
			return true;
		}
		return false;
	}
</script>
</html>